package com.dhj.streamTest.entity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class AuthorList {

    public static List<Author> getAuthors() {

        //数据初始化
        Author author = new Author(1L,"李白",55,"唐诗",null);
        Author author2 = new Author(2L,"苏轼",72,"宋词",null);
        Author author3 = new Author(3L,"关汉卿",68,"元曲",null);
        Author author4 = new Author(3L,"关汉卿",68,"元曲",null);

        //书籍列表
        List<Book> books1 = new ArrayList<>();
        List<Book> books2 = new ArrayList<>();
        List<Book> books3 = new ArrayList<>();

        books1.add(new Book(1L,"《梦游天姥吟留别》","奇幻,浪漫",56,"且放白鹿青崖间"));
        books1.add(new Book(2L,"《赠汪伦》","友情,成长",88,"桃花潭水深千尺"));

        books2.add(new Book(3L,"《题西林壁》","哲学",85,"不识庐山真面目"));
        books2.add(new Book(3L,"《水调歌头》","思念",86,"明月几时有"));
        books2.add(new Book(4L,"《记承天寺夜游》","友情,个人传记",56,"庭下如积水空明"));

        books3.add(new Book(5L,"《窦娥冤》","冤屈",52,"感天动地窦娥冤"));
        books3.add(new Book(6L,"《救风尘》","救人",78,"赵盼儿风月救风尘"));
        books3.add(new Book(6L,"《单刀会》","三国",92,"关羽单刀赴鲁肃宴会"));

        author.setBooks(books1);
        author2.setBooks(books2);
        author3.setBooks(books3);
        author4.setBooks(books3);

        return new ArrayList<>(Arrays.asList(author,author2,author3,author4));
    }


}
